package com.labbit.platform.manager.exception.message;

import com.labbit.platform.commons.exception.message.ExceptionMessage;

/**
 * @description: User 模块code 10000开头
 * @Author: CHEN YU
 * @Date: 2020-12-20 17:55
 **/
public enum  UserError implements ExceptionMessage {


    USER_OR_PASSWORD_NOT_MATCH(10001,"用户名和密码不匹配"),
    ROLE_NOT_FOUND(10002,"角色不存在"),
    USERNAME_EXIST(10003,"用户名[{}]已经存在"),
    MESSAGE_CODE_INVALID(10004,"短信验证码错误");

    private int code;
    private String message;

    UserError(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public int getCode() {
        return code;
    }
}
